package com.neusoft.neuiotms.dcam.common.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractModel;
import com.neusoft.bizcore.web.jpa.model.Comment;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@Entity
@org.hibernate.annotations.Table(appliesTo = "neuiot_manufacturer", comment = "供应商表")
@Table(name = "neuiot_manufacturer")
public class Manufacturer extends AbstractModel {

    private static final long serialVersionUID = 1L;

    /** 供应商名称 */
    @NotBlank(message = "供应商名称不能为空")
    @Length(max = 255, message = "供应商名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '供应商名称'")
    private String name;

    /** 供应商地址 */
    @Length(max = 255, message = "供应商地址不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String address;

    /** 供应商联系人 */
    @Length(max = 255, message = "供应商联系人不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String person;

    /** 供应商联系方式 */
    @Length(max = 255, message = "供应商联系方式不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String phone;

    /** 供应商开户行 */
    @Length(max = 255, message = "供应商开户行不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NOT NULL COMMENT '供应商开户行'")
    private String bank;

    /** 供应商账号 */
    @Length(max = 255, message = "供应商账号不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NOT NULL COMMENT '供应商账号'")
    private String accountNumber;

    /** 供应商税号 */
    @Length(max = 255, message = "供应商税号不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NOT NULL COMMENT '供应商税号'")
    private String taxId;

    /** 供应商邮编 */
    @Length(max = 255, message = "供应商邮编不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NOT NULL COMMENT '供应商邮编'")
    private String postCode;

    /** 状态 */
    @Comment("bit(1) NOT NULL COMMENT '状态'")
    private Boolean status = true;
}
